package me.hetong.caigou.util;

import me.hetong.caigou.Global;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import org.mapdb.IndexTreeList;

import java.util.concurrent.ConcurrentMap;

/**
 * MapDB数据库
 *
 * @author hetong
 */
public class MapDB {

    public static IndexTreeList<Object> puList;
    private static ConcurrentMap map;

    static {


        DB db = DBMaker.fileDB(Global.homePath + "caigou_20230813.db")
                .checksumHeaderBypass()
                .make();
        map = db.hashMap("map").createOrOpen();
        puList = db.indexTreeList("puList").createOrOpen();
    }
}